DOC-13911: Migrate OpenAPI Generator templates to Handlebars#206
Conversation
because the FontAwesome icons are unavailable
There was a problem hiding this comment.
Pull request overview
This PR migrates OpenAPI Generator templates from Mustache to Handlebars across all REST API documentation modules in the Couchbase server documentation.
Changes:
- Adds
engine = "handlebars"configuration to all Gradle build files that generate OpenAPI documentation - Updates generated AsciiDoc index files with formatting changes, including removal of commented-out "markup not found" lines
- Adds
nullable: trueproperty to specific schema fields in analytics-links.yaml
Reviewed changes
Copilot reviewed 30 out of 62 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
| *.gradle | Adds handlebars engine configuration to OpenAPI generation tasks |
| */pages/index.adoc | Regenerated documentation with handlebars templates, removing placeholder comments and adjusting spacing |
| analytics-links.yaml | Marks alternateAddresses and hostname fields as nullable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks promising! It looks like OG uses https://javadoc.io/doc/com.github.jknack/handlebars/4.0.6/com/github/jknack/handlebars/helper/StringHelpers.html which has Obviously fixing that is trivial if we move to OG+ wholesale. |
Thank you, that was actually very helpful. |
osfameron
left a comment
There was a problem hiding this comment.
"Close enough for jazz!" 🎶 🎷
No need to use cut helper
* Create handlebars templates * Remove mustache templates * Switch all gradle build scripts to use handlebars * Get tag names from operation * Two-column model ToC * Output Nullable field * Use "yes" for unique items and nullable * Only show top-level models in the nav * Update Analytics Links spec with nullable fields * Fix Query Settings examples (jsonc → json) * Get rid of the italics * Handle Redocly x-enumDescriptions * Use capitalize helper for tag names * Update security schemas to use x-displayName * Build output documentation
* Create handlebars templates * Remove mustache templates * Switch all gradle build scripts to use handlebars * Get tag names from operation * Two-column model ToC * Output Nullable field * Use "yes" for unique items and nullable * Only show top-level models in the nav * Update Analytics Links spec with nullable fields * Fix Query Settings examples (jsonc → json) * Get rid of the italics * Handle Redocly x-enumDescriptions * Use capitalize helper for tag names * Update security schemas to use x-displayName * Build output documentation
* Create handlebars templates * Remove mustache templates * Switch all gradle build scripts to use handlebars * Get tag names from operation * Two-column model ToC * Output Nullable field * Use "yes" for unique items and nullable * Only show top-level models in the nav * Update Analytics Links spec with nullable fields * Fix Query Settings examples (jsonc → json) * Get rid of the italics * Handle Redocly x-enumDescriptions * Use capitalize helper for tag names * Update security schemas to use x-displayName * Build output documentation
Docs issue: DOC-13911
Replaces the openapi-generator mustache templates with handlebars templates.
The functionality and structure of the templates is pretty much the same. The main differences are:
optionaloption. If the partial does not exist it is simply not displayed.ifdef,ifndef, andifevallogic in the output doc. It may be possible to get rid of these with handlebars helpers, but that's beyond me for the present.Note for reviewers: I'm not expecting you to go through the handlebars with a fine-tooth comb, but it would be great if you wanted to do that. What I suggest is that you look at the output
index.adocfiles. You should see that they are pretty much the same, with mostly only spacing differences and differences as noted above.Doc previews:
You will need the Docs Team credentials on Confluence.